package io.renren.dao;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import io.renren.entity.QuestionRecordEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 题目记录表（记录顺序练习的题目）
 *
 * @author LANLING
 * @email lanling@gmail.com
 * @date 2018-10-25 14:20:38
 */
public interface QuestionRecordDao extends BaseMapper<QuestionRecordEntity> {

    List<Map<String, Object>> getSort(@Param("subjectId") Integer subjectId, @Param("questionId") Integer questionId);

    /***
     * 获取顺序练习题目
     * @param studentId 学员id
     * @param subjectId 科目id
     * @param sort 序号
     * @param sort2 用于limit的运算
     * @return
     */
    List<Map<String, Object>> getQuestionList(@Param("studentId") Long studentId, @Param("subjectId") Integer subjectId, @Param("sort") Integer sort, @Param("sort2")Integer sort2);

    List<Map<String, Object>> getMenuSortInfoList(@Param("studentId") Long studentId, @Param("subjectId") Integer subjectId);

    List<Map<String, Object>> getAnswerList(@Param("subjectId") Integer subjectId, @Param("studentId") Long studentId);

    /***
     * 重置顺序练习
     * @param studentId 学员id
     * @param subjectId 科目id
     * @return R
     */
    public void reset(@Param("studentId")Long studentId, @Param("subjectId")Integer subjectId);
}
